<!-- $Id: bonus_by_print.htm 14216 2015-02-04 02:27:21Z derek $ -->
{include file="pageheader.htm"}
<div class="main-div">
<form action="takegoods.php" method="post" name="theForm"  onsubmit="return validate()">
<table width="100%">
  
   <tr>
      <td class="label">{$lang.send_valucard_count}</td>
      <td>
      <input type="text" id="sendNum" name="send_sum" size="30" maxlength="6" />
      </td>
    </tr>
    <td class="label">&nbsp;</td>
    <td>{$lang.valuecard_sn_notic}</td>
   </tr>
   <tr>
   <td class="label">&nbsp;</td>
   <td>
    <input type="submit" value="{$lang.button_submit}" class="button" />
    <input type="reset" value="{$lang.button_reset}" class="button" />
  </td>
 </tr>
</table>
<input type="hidden" name="type_id" value="{$type_id}" />
<input type="hidden" name="act" value="send_by_print" />
</form>
</div>
{insert_scripts files="../js/utils.js,validator.js"}
{literal}
<script language="JavaScript">
<!--
document.forms['theForm'].elements['bonus_sum'].focus();
/**
 * 检查表单输入的数据
 */

function validate()
{
	var num=document.getElementById("sendNum").value;
    if(!isPositiveNum(num)){
    	alert("发放数量需为正整数！");
    	return false;
    }
    validator = new Validator("theForm");
    validator.required("bonus_type_id",   bonus_type_empty);
    validator.required("bonus_sum",   bonus_sum_empty);
    validator.isNumber("bonus_sum",   bonus_sum_number, true);
    
   
    return validator.passed();
}
//是否为正整数  
function isPositiveNum(s){
    var re = /^[0-9]*[1-9][0-9]*$/ ;  
    return re.test(s)  
} 
onload = function()
{
    // 开始检查订单
    startCheckOrder();
}
//-->
</script>
{/literal}
{include file="pagefooter.htm"}